from langchain.chains.llm import LLMChain
from langchain_community.llms.openai import OpenAI
from langchain_core.prompts import PromptTemplate
import __init__

prompt_template = "给做{product}的公司起一个名字？"

llm = OpenAI(
    temperature=0
)

llm_chain = LLMChain(
    llm=llm,
    prompt=PromptTemplate.from_template(prompt_template),
    verbose=True
)

print(llm_chain("儿童玩具"))
print(llm_chain.run("儿童玩具"))
print(llm_chain.apply([
    {'product': "儿童玩具"}
]))
a = llm_chain.generate([
    {"product": "儿童玩具"},
])
print(a)
print(llm_chain.predict(product="儿童玩具"))
